<style type="text/css">
.no-indent{text-indent:0px;}
.indent {text-indent:25px;}
.indent2 {text-indent:50px;}
.indent3 {text-indent:75px;}
.indent4 {text-indent:100px;}
</style>
<div class="bookMeta">
<h4>{% if book.publisher_listing_url %}<a href="/redirect/{{ book.publisher_listing_url|safe}}/">{% endif %}
	{% if book.image_url %}<img src="{{ book.image_url|safe }}" width="65px" align="left" style="padding:0 10px 10px 0"/>{% endif %}
	{{ book.title|title|safe }}{% if book.edition %}, {{ book.edition|safe }}ed{% endif %}{% if book.publisher_listing_url %}</a>{% endif %}.<br/>
	<span style="font-size:80%;">
		Author(s):
		{% if book.authors %}
			{% for author in book.authors %}
				{{ author.first_name|title|safe }} {{ author.last_name|title|safe }}{% if not forloop.last %}, {% else %}. {% endif %}{% endfor %}
			<br/>
		{% endif %}
		{% if book.isbn %}
			ISBN: {{book.isbn|safe}}.
		<br/>
		{% endif %}
		{% if book.year %}
			Year: {{book.year|safe}}.
		<br/>
		{% endif %}
		{% if book.publisher %}
			Publisher:
			{% if book.publisher.website %}<a href="/redirect/{{ book.publisher.website|safe }}/">{% endif %}
			{{ book.publisher.name|title|safe }}{% if book.publisher.website %}</a>{% endif %}.
		{% endif %}
	</span></h4>
	<div style="clear:both;"></div>
</div>
<div class="bookTOC">
	{% for chap in book.toc %}
	<div><!-- float container -->
		<div class = "no-indent">
			<span style="float:left;">
				{{ chap.hierarchy|safe }} {{chap.name|safe}}
				{% for topic in chap.topics %}
					<a href="/{{topic.id|safe}}/">[{{ topic.name|title|safe }}]</a>{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</span>
			<span style="text-align:right;float:right">{% if chap.page %}{{ chap.page|safe }}{% endif %}</span><br/>
		</div>
		<div style="clear:both;"></div>
	</div>
		{% for sec in chap.children %}
		<div><!-- float container -->
			<div class="indent";style="width:100%">
				<span style="float:left;">
					{{ sec.hierarchy|safe }} {{sec.name|safe}}
					{% for topic in sec.topics %}
						<a href="/{{topic.id|safe}}/">[{{ topic.name|title|safe }}]</a>{% if not forloop.last %}, {% endif %}
					{% endfor %}
				</span>
				<span style="text-align:right;float:right">{% if sec.page %}{{ sec.page|safe }}{% endif %}</span><br/>
			</div>
			<div style="clear:both;"></div>
		</div>
			{% for subsec in sec.children %}
			<div><!-- float container -->
				<div class="indent2";style="width:100%">
					<span style="float:left;">
						{{ subsec.hierarchy|safe }} {{subsec.name|safe}}
						{% for topic in subsec.topics %}
							<a href="/{{topic.id|safe}}/">[{{ topic.name|title|safe }}]</a>{% if not forloop.last %}, {% endif %}
						{% endfor %}
					</span>
					<span style="text-align:right;float:right">{% if subsec.page %}{{ subsec.page|safe }}{% endif %}</span><br/>
				</div>
				<div style="clear:both;"></div>
			</div>
				{% for subsubsec in subsec.children %}
				<div><!-- float container -->
					<div class="indent3">
						<span style="float:left;">
							{{ subsubsec.hierarchy|safe }} {{subsubsec.name|safe}}
							{% for topic in subsubsec.topics %}
								<a href="/{{topic.id|safe}}/">[{{ topic.name|title|safe }}]</a>{% if not forloop.last %}, {% endif %}
							{% endfor %}
						</span>
						<span style="text-align:right;float:right">{% if subsubsec.page %}{{ subsubsec.page|safe }}{% endif %}</span><br/>
					</div>
					<div style="clear:both;"></div>
				</div>
				{% endfor %}
			{% endfor %}
		{% endfor %}
	{% endfor %}
</div>